package com.alibaba.springbootrbac.service;

import com.alibaba.springbootrbac.model.entity.Role;
import com.alibaba.springbootrbac.model.param.role.*;
import com.baomidou.mybatisplus.core.metadata.IPage;

/**
 * 角色管理
 */
public interface RoleService {

    void addRole(RoleParam param);

    void updateRoleById(UpdateRoleParam param);

    void deleteRoleById(DeleteRoleParam param);

    IPage<Role> queryRolesByPage(RolePageQueryParam param);

    /**
     * 为角色分配权限
     */
    void assignPermissionsToRole(RolePermissionParam param);

    /**
     * 删除角色的单个权限
     */
    void removePermissionFromRole(RolePermissionParam param);

    /**
     * 批量删除角色的权限
     */
    void removePermissionsFromRole(RolePermissionParam param);
}
